﻿using Ongoal.Quotation.Common;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;

namespace Ongoal.Quotation.Service.Model.basemodel
{
    /// <summary>
    /// 字段信息表实体
    /// </summary>
    public class R_Table_Filed_Reference : ModelBase
    {
        //主键
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int ID { get; set; }
        //所属表
        [SugarColumn(IsNullable = false, ColumnDescription = "所属表")]
        public int TableID { get; set; }
        //字段名称
        [SugarColumn(IsNullable = false, ColumnDescription = "字段名称")]
        public string FiledName { get; set; }
        //字段代码
        [SugarColumn(IsNullable = false, ColumnDescription = "字段代码")]
        public string FiledCode { get; set; }
        //数据类型
        [SugarColumn(IsNullable = false, ColumnDescription = "数据类型")]
        public int DataType { get; set; }
        //字段长度
        [SugarColumn(IsNullable = true, ColumnDescription = "字段长度")]
        public int FiledLength { get; set; }
        //是否可空
        [SugarColumn(IsNullable = true, ColumnDescription = "是否可空")]
        public int Nullable { get; set; }
        //是否外键
        [SugarColumn(IsNullable = true, ColumnDescription = "是否外键")]
        public int IsForeign { get; set; }
        //外键表ID
        [SugarColumn(IsNullable = true, ColumnDescription = "外键表ID")]
        public int ForeignTableID { get; set; }
        //外键字段ID
        [SugarColumn(IsNullable = true, ColumnDescription = "外键字段ID")]
        public int ForeignFiledID { get; set; }
        //数据验证正则表
        [SugarColumn(IsNullable = true, ColumnDescription = "数据验证正则表")]
        public string VerifyRegular { get; set; }
        //是否主键
        [SugarColumn(IsNullable = true, ColumnDescription = "是否主键")]
        public int IsPrimaryKey { get; set; }
        //是否递增
        [SugarColumn(IsNullable = true, ColumnDescription = "是否递增")]
        public int IsIdentity { get; set; }
        //备注
        [SugarColumn(IsNullable = true, ColumnDescription = "备注")]


        public string Remark { get; set; }
        [SugarColumn(IsNullable = true, ColumnDescription = "是否支持模糊匹配")]
        public int IsLikeFiled { get; set; }

        [SugarColumn(IsNullable = true, ColumnDescription = "代码类型")]
        public int CodeTable { get; set; }

        //外键表显示字段
        [SugarColumn(IsNullable = true, ColumnDescription = "外键表显示字段")]
        public int ForeignLableFiled { get; set; }

    }
}
